
BIN = code
SOU = $(wildcard *.c)
OBJ = $(SOU:.c=.o)
CC = gcc
RM = rm -f
CFLAG = -c

$(BIN) : $(OBJ)
	$(CC) -o $(@) $(^)
%.o : %.c
	$(CC) $(CFLAG) $(<)

.PHONY:clean
clean:
	$(RM) $(OBJ) $(BIN)
	
